TEST = True
REDIS_CON = {
    "host": "192.168.1.78",
    "port": 6379,
    "db": 0,
    "password": "kyk123"
} if TEST else {
    "host": "47.106.132.110",
    "port": 6379,
    "db": 0,
    "password": "ECetwZ7RYJZsQMkEP5TbhTNRwszC8xmqCekCg6mjQNjM7HH2AXaTyxvWfxycmzaE"
}

REDIS_URL = "redis://:{password}@{host}:{port}/{db}".format(**REDIS_CON)
QUEUE_KEY = "prompt-gpt-video-test" if TEST else "prompt-gpt-video-prod"
PRE_PATH = r'E:\share\images'
VIDEO_PRE_PATH = r'F:\video\mixkit'
PIC_IN_PATH = r"static\pictures\examples"
MAX_WORKERS = 3  # 跟CPU性能有关
MAX_RETRY = 5
MAX_RECONNECT_TIMES = 30
# （8.5-11）11s有五百多，8.5s有两百多,筛选视频片段的长度
MAX_VIDEO_TIME = 8.5

# Azure云相关的配置
AZURE_SETTING = {
    "API_KEY": "5fa76d1efe7842fbb9310f93a1b9b93f",
    "API_VERSION": "2023-12-01-preview",
    "API_ENDPOINT": "https://kykgpt.openai.azure.com",
}

# 获取视频素材的mysql配置
VIDEO_MySQL_PARAMS = {
    "host": "192.168.1.45",
    "user": "xzl",
    "password": "Xzl4kyk!",
    "port": 3306,
    "database": "qcc_company_graph",
    "charset": "utf8mb4",
}


# #视频任务的接口网址
# VIDEO_JOB_API_URL = 'http://192.168.1.52:19250/api/v1/job-worker'
# VIDEO_SAVE_API_URL = 'http://192.168.1.52:19250/api/v1/job-status'
# VIDEO_ADD_JOB_URL = 'http://192.168.1.52:19250/api/v1/job-producer'
# VIDEO_DETAIL_URL = 'http://192.168.1.52:19250/api/v1/job-detail'
# VIDEO_PUSH_MESSAGE_URL = 'https://www.keyike.ltd/ksr-api/app/agent/device/na/push-message'

VIDEO_JOB_API_URL = 'http://127.0.0.1:8000/api/v1/job-worker'
VIDEO_SAVE_API_URL = 'http://127.0.0.1:8000/api/v1/job-status'
VIDEO_ADD_JOB_URL = 'http://127.0.0.1:8000/api/v1/job-producer'
VIDEO_DETAIL_URL = 'http://127.0.0.1:8000/api/v1/job-detail'
VIDEO_PUSH_MESSAGE_URL = 'https://www.keyike.ltd/ksr-api/app/agent/device/na/push-message'

# oss相关的配置,过期时间为10天
EXPIRE_DAY = 10